| Advanced feature (returnid.cgi &
returnid.htm)
Set cookie with one domain
and read it from an other...
Due to security restrictions,
cookies can be read out only by the same domain name that originally sets
it. If you want to read the cookie from a different domain (e.g. secure
order forms) but use your domain name for the affiliate URLs, you must
configure returnid.cgi and returnid.htm:
1. Install script.cgi on
the server where the cookie should be read out (e.g. secure server) and
returnid.cgi on your main server (in our example sunnyscript.com). Copy
returnid.htm to the web-directory of the main server (where returnid.cgi
is located).
2. Open script.cgi and returnid.cgi
in a text editor and follow the configuration instructions included within
the files.
3.Open returnid.htm in a
text editor and change the line <!--#exec cgi="/cgi-bin/returnid.cgi"-->
that it reflects the correct path to returnid.cgi. The refresh tag in the
head must contain the URL where visitors are redirected after the cookie
is set. Due to optical reasons the variable "homepage" in script.cgi should
contain the same URL (but will be ignored completely in this case).
4. The URLs for your affiliates
looks like
| |
http://www.sunnyscript.com/returnid.htm?id=AffiliateID |
Important note: This
method requires SSI (server side includes) enabled on the server (ask your
provider for more information). It may be necessary to rename returnid.htm
to returnid.shtml or similar, depending on the way your server handles
SSI.
How does returnid.cgi
and returnid.htm work ?
Technically, returnid.htm
sends the affiliate's identification to returnid.cgi. Now a cookie is set
using the domain where script.cgi is installed (of course, you must tell
returnid.cgi about this domain - look to the installation part inside the
script).
In case of errors with
SSL or SSI: Try the alternative solution...
For example some SSL servers
does not allow access without encryption (http://... instead of https://...)
and other systems may not be able to handle SSI calls. But the YourShop
IDTracker will also run on such systems:
Install script.cgi on the
server (URL) you want to read out the affiliate id (e.g. secure server).
Change the configuration variable $homepage (located in script.cgi) that
it points to a webpage on this server containing a redirection to your
normal website.
In this way you can read
out the affiliate id from the other server (URL) later without using returnid.cgi
& returnid.htm. |